package edu.predatorwars.client.visualization;

import java.awt.Point;
import java.lang.reflect.Method;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Mesh;
import com.badlogic.gdx.math.Matrix4;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.math.collision.BoundingBox;

import edu.predatorwars.shared.models.Creature;


public class VisPlayer extends VisModel {


	private PlayerExt player;
	
	public VisPlayer(PlayerExt Player) {
		super();
		player = Player;
		refreshText();
	}
	
	public VisPlayer(PlayerExt Player, int len1D, int len2D) {
		super(Player.getPlayerLocation(), len1D, len2D, false);
		player = Player;
		refreshText();
	}
	
	public VisPlayer(PlayerExt Player, Mesh Model, Matrix4 MVMatrix) {
		super(Model, MVMatrix);
		player = Player;
		refreshText();
	}
	
	
	public PlayerExt getPlayer() {
		return player;
	}
	
	
	public void setPlayer(PlayerExt Player) {
		player = Player;
		refreshText();
	}
	
	
	private void refreshText() {
		Creature c = player.getCreature();
		this.setMoverText(c.getStat(Creature.STAT_HEALTH) + "  /  " + c.getStat(Creature.STAT_MAX_HEALTH) + "\n" + 
				c.getStat(Creature.STAT_STRENGTH) + "\n" +
				c.getStat(Creature.STAT_ARMOR) + "\n" + 
				c.getStat(Creature.STAT_SIGHT) + "\n" +
				c.getStat(Creature.STAT_SPEED) + "\n");
	}
}